import request from '@/utils/request'

// 请求商品列表
const fatchCates = (params = {}) => (
  request.get('/cateLists', { params })
)
// 新增商品分类
const fatchAddCates = (params = {}) => (
  request.post('/addCate', params)
)

// 获取分类详情
const fatchCateDetail = (params = {}) => {
  return request.get('/cateDetail', { params })
}
// 修改商品分类
const fatchUpdateCate = (params = {}) => {
  return request.put('/updateCate', params)
}

// 新增商品分类
const fatchDelCate = (params = {}) => (
  request.delete('/delCate', { params })
)

export {
  fatchCates,
  fatchAddCates,
  fatchCateDetail,
  fatchUpdateCate,
  fatchDelCate
}
